﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1.Config
{
    //实体类的映射关系
   public class TestConfiger: EntityTypeConfiguration<Test>
    {
        public TestConfiger()
        {
            this.ToTable(nameof(Test));
            this.Property(e => e.Name).HasMaxLength(30);
            this.Property(e => e.Name).IsRequired();
        }
    }
}
